home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / ups / genpower.000 / genpower / genpower-1.0.1 / Makefile < prev    next >
Makefile  |  1995-07-16  |  2KB  |  81 lines

  1. ########################################
  2. #                                      #
  3. # Makefile for genpowerd.              #
  4. # by Tom Webster <webster@kaiwan.com>  #
  5. # v.1.0.1        1995/07/05            #
  6. #                                      #
  7. ######################################## 
  8.  
  9. NAME          = genpower-1.0.1
  10. BINDIR         = /sbin
  11. SCRIPTDIR     = /etc
  12. MANDIR        = /usr/man/man8
  13. OWNER         = root
  14. GROUP         = root
  15.  
  16. CC        = cc
  17. CFLAGS        = -N -Wall -O6
  18.  
  19. all:        genpowerd gentest
  20.  
  21.  
  22. genpowerd:    genpowerd.c genpowerd.h
  23.         ${CC} ${CFLAGS} $@.c -o $@
  24.  
  25. gentest:    gentest.c
  26.         ${CC} ${CFLAGS} $@.c -o $@
  27.  
  28. clean:
  29.         rm -f *.o *.bak genpowerd gentest
  30.  
  31. install:    binstall manstall
  32.  
  33. binstall:    genpowerd 
  34.         cp -f genpowerd ${BINDIR}
  35.         cd ${BINDIR}; \
  36.         chmod 754 genpowerd; \
  37.         chgrp ${GROUP} genpowerd; \
  38.         chown ${OWNER} genpowerd
  39.         cp -f genpowerfail ${SCRIPTDIR}
  40.         cd ${SCRIPTDIR}; \
  41.         chmod 754 genpowerfail; \
  42.         chgrp ${GROUP} genpowerfail; \
  43.         chown ${OWNER} genpowerfail
  44.  
  45. manstall:    
  46.         cp -f genpowerd.8 ${MANDIR}
  47.  
  48. clobber:
  49.         rm -f *.o *.bak genpowerd gentest
  50.         cd ${BINDIR}; \
  51.         rm -f genpowerd
  52.         cd ${SCRIPTDIR}; \
  53.         rm -f genpowerfail
  54.  
  55. oldclobber:
  56.         cd ${BINDIR}; \
  57.         rm -f unipowerd
  58.         cd ${SCRIPTDIR}; \
  59.         rm -f unipowerfail
  60.         cd ${MANDIR}; \
  61.         rm -f unipowerd.8
  62.  
  63. upgrade:    oldclobber install
  64.  
  65. tgz:
  66.         @if [ -f $(NAME).tgz ]; \
  67.         then \
  68.             echo "Removing old archive..."; \
  69.             rm $(NAME).tgz; \
  70.         fi
  71.         @echo Creating tar archive...
  72.         @ cd ..; \
  73.         ls -l $(NAME) > Packing.List; \
  74.         mv Packing.List $(NAME);\
  75.         touch $(NAME)/*; \
  76.         ls -l $(NAME) > Packing.List; \
  77.         mv Packing.List $(NAME);\
  78.         tar cvfz $(NAME).tgz $(NAME); \
  79.         mv $(NAME).tgz $(NAME)
  80.         @echo Tar archive created
  81.